package com.wdl.modules.myhouse.common;

/**
 * 状态码
 * @author 昏昏的君
 */
public enum Code {
    TOKEN_NOT_EXISTS(102,"TOKEN 不存在"),
    TOKEN_UNLEGAL(101,"TOKEN不合法"),
    TOKEN_TIMEOUT(103,"TOKEN过期了"),

    SUCCESS(200,"成功"),



    UNAUTHORIZED(403,"未登陆"),
//    Permission denied
    PERMISSION_DENIED(408,"未授权"),
    PAGE_NOT_FOUND(404,"页面为找到"),



    INTERNAL_ERROR(500,"后台代码逻辑错误"),
    COMMON_ERROR(501,"常见错误,错误消息自定义"),
    USER_NOT_FOUND(503,"用户不存在"),
    PASSWORD_NOT_CORRECT(504,"密码不正确"),
    REMEMBER_COOKIE_NOT_COORECT(505,"REMEMBER-ME校验不通过"),
    VERIFY_CODE_ERROR(506,"验证码不正确")
    ;
    /**
     * 状态码
     */
    private Integer code;
    /**
     * 提示信息
     */
    private String  message;

    Code(Integer code, String message) {
        this.code=code;
        this.message=message;
    }

    public Integer getCode() {
        return this.code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
